home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-09-30 | 1.7 KB | 90 lines | [TEXT/ExPr] |
- * define a submenu
- *
- x = 'abc def ghijk/3<I lm'
- lval x,submenu
- menu new,21,-1,submenu
- *
- * define a sample menu and add to menu bar
- *
- x = 'item1/1 item2/2 x'
- lval x,xsample
- xsample[3] = 'submenu/' #char(27) '!' #char(21)
- menu new,20,0,xsample
- menuscript 20,'MenuResponse'
- menuscript 21,'MenuResponse'
- *
- * the dialog template is stored in the following file
- rfopen 'dialog resources',rfnum
- *
- * the dialog displays the list ll created from a user selected directory
- *
- dir
- listdir ll
- list ll
- *
- * items 3 & 4 form Group A Radio Buttons
- * items 6 & 7 form Group A Radio Buttons
- *
- dloglist[3] = 'eGroup A #1'
- dloglist[4] = 'sGroup A #2'
- dloglist[5] = ''
- dloglist[6] = 'sGroup B #1'
- dloglist[7] = 'eGroup B #2'
- *
- * item 13 is a pop-up menu initialized to show the second item in the list
- *
- menuset 20,2
- dloglist[13] = 21
- dloglist[14] = 'epop-up:'
- *
- * item 15 is the directory list, using preselection
- *
- dloglist[15] = 'nn00ll'
- *
- * item 16 is an arbitrary list without preselection
- *
- dloglist[16] = 'oN80aaa'
- x = '"item 1" "item 2" "item 3"'
- lval x,aaa
- *
- *show the dialog
- *
- debug off
- dialog dloglist,10
- *
- * let's see which items were selected from the directory
- *
- listp ll
- listp aaa
- dloglist = 16
- list dloglist
- *
- * let's see what happened to the radio buttons and check boxes
- *
- i = 3
- do while i < 8
- display 'control ' i ' = ' dloglist[i]
- inc i
- end
- *
- * what happened to the edit text items
- *
- display 'edit text item 9 = 'dloglist[9]
- display 'edit text item 11 = 'dloglist[11]
- *
- * which item did we select in the menu
- *
- display 'menuid 20 '#menu(20) ': menuid 21 '#menu(21)
- *
- * how did we exit the dialog
- *
- if #ret
- display 'you selected cancel'
- else
- display 'you selected OK'
- end
- rfclose rfnum
- *
- script MenuResponse
- display 'MenuResponse: ' #arg(1)':'#arg(2)
-